﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using System.IO;
using System.Text.RegularExpressions;

namespace DailyRssDownload.Lib {
    [Serializable]
	public class RssFeed : Feed {
		public RssFeed() {
		}
		
		public RssFeed(XDocument rssfeed) {
			this.Title = rssfeed.Element("rss").Element("channel").Element("title").Value;
		}

		public override IEnumerable<Entry> GetEntries(XDocument rssfeed) {
			return from item in rssfeed.Descendants("item")
				   select (Entry)new RssEntry(item, this);
		}
	}
}
